package com.example.leetcode.array;

import com.example.leetcode.array.common.ArrayUtils;

class Solution6404 {
    public long countOperationsToEmptyArray(int[] nums) {
//        return ArrayUtils.countOperationsToEmptyArray(nums);
//        return ArrayUtils.countOperationsToEmptyArray2(nums);
        return ArrayUtils.countOperationsToEmptyArray3(nums);
    }
}

public class leetcode6404 {
    public static void main(String[] args) {
        Solution6404 solution6404 = new Solution6404();
        int[] nums = {3, 4, -1};
        int[] nums1 = {1, 2, 4, 3};
        int[] nums2 = {1, 2, 3};
        int[] nums3 = {-15, -19, 5};
//        System.out.println(solution6404.countOperationsToEmptyArray(nums)); // 5
//        System.out.println(solution6404.countOperationsToEmptyArray(nums1)); // 5
//        System.out.println(solution6404.countOperationsToEmptyArray(nums2)); // 3
        System.out.println(solution6404.countOperationsToEmptyArray(nums3)); // 5
    }
}
